/*
 * Copyright 2025 The JA-SIG Collaborative. All rights reserved. distributed with this file and
 * available online at
 */
package com.lap.auth.application.msg.command;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

@Data
@Schema(description = "更新消息模版命令")
public class UpdateMsgTemplateCmd {

  @NotNull(message = "{msgTemplate.module.required}")
  @Range(min = -127, max = 128, message = "{msgTemplate.module.range}")
  @Schema(description = "模板类型,使用数字字典")
  private Integer module;

  @NotBlank(message = "{msgTemplate.code.required}")
  @Length(max = 128, message = "{msgTemplate.code.max.length}")
  @Schema(description = "模版编码,不能修改")
  private String code;

  @NotBlank(message = "{msgTemplate.name.required}")
  @Length(max = 64, message = "{msgTemplate.name.max.length}")
  @Schema(description = "模版名称")
  private String name;

  @NotBlank(message = "{msgTemplate.title.required}")
  @Length(max = 256, message = "{msgTemplate.title.max.length}")
  @Schema(description = "模版主题")
  private String title;

  @NotBlank(message = "{msgTemplate.content.required}")
  @Length(max = 42949675, message = "{msgTemplate.content.max.length}")
  @Schema(description = "模版内容")
  private String content;
}
